package com.ruoyi.exam.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.exam.mapper.ExamTeacherMapper;
import com.ruoyi.exam.domain.ExamTeacher;
import com.ruoyi.exam.service.IExamTeacherService;

/**
 * 教师管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-11-11
 */
@Service
public class ExamTeacherServiceImpl implements IExamTeacherService 
{
    @Autowired
    private ExamTeacherMapper examTeacherMapper;

    /**
     * 查询教师管理
     * 
     * @param teacherId 教师管理主键
     * @return 教师管理
     */
    @Override
    public ExamTeacher selectExamTeacherByTeacherId(Long teacherId)
    {
        return examTeacherMapper.selectExamTeacherByTeacherId(teacherId);
    }

    /**
     * 查询教师管理列表
     * 
     * @param examTeacher 教师管理
     * @return 教师管理
     */
    @Override
    public List<ExamTeacher> selectExamTeacherList(ExamTeacher examTeacher)
    {
        return examTeacherMapper.selectExamTeacherList(examTeacher);
    }

    /**
     * 新增教师管理
     * 
     * @param examTeacher 教师管理
     * @return 结果
     */
    @Override
    public int insertExamTeacher(ExamTeacher examTeacher)
    {
        examTeacher.setCreateTime(DateUtils.getNowDate());
        return examTeacherMapper.insertExamTeacher(examTeacher);
    }

    /**
     * 修改教师管理
     * 
     * @param examTeacher 教师管理
     * @return 结果
     */
    @Override
    public int updateExamTeacher(ExamTeacher examTeacher)
    {
        examTeacher.setUpdateTime(DateUtils.getNowDate());
        return examTeacherMapper.updateExamTeacher(examTeacher);
    }

    /**
     * 批量删除教师管理
     * 
     * @param teacherIds 需要删除的教师管理主键
     * @return 结果
     */
    @Override
    public int deleteExamTeacherByTeacherIds(Long[] teacherIds)
    {
        return examTeacherMapper.deleteExamTeacherByTeacherIds(teacherIds);
    }

    /**
     * 删除教师管理信息
     * 
     * @param teacherId 教师管理主键
     * @return 结果
     */
    @Override
    public int deleteExamTeacherByTeacherId(Long teacherId)
    {
        return examTeacherMapper.deleteExamTeacherByTeacherId(teacherId);
    }
}
